﻿
namespace Crocodoc
{
    /// <summary>
    /// Represents options for when creating a new Crocodoc session.
    /// </summary>
    public class CreateSessionOptions
    {
        /// <summary>
        /// Gets or sets the filter that limits which users' annotations and comments are shown.  Possible values are: "all", "none", or a comma-separated
        /// list of user IDs as specified in the user feild. Defaults to all.
        /// </summary>
        public string Filter
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets whether or not if the user is allowed to modify or delete any annotations and comments, including those belonging to other users.
        /// </summary>
        public bool IsAdmin
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets whether or not if text can be selected in the document.
        /// </summary>
        public bool IsCopyProtected
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets whether or not changes should be prevented from being persisted.
        /// </summary>
        public bool IsDemo
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets whether or not the users can download the original document.
        /// </summary>
        public bool IsDownloadable
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets whether if users can create annotations and comments while viewing the document with this session key.
        /// </summary>
        public bool IsEditable
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets whether the viewer sidebar (used for listing annotations) is included, and the option for that sidebar.
        /// </summary>
        public SidebarOptions Sidebar
        {
            get;
            set;
        }

        /// <summary>
        /// The user who's name will be shown in the viewer to attribute annotations and comments. Required if IsEditable is true.
        /// </summary>
        public CrocodocUser User
        {
            get;
            set;
        }
    }

    /// <summary>
    /// Options for the Sidebar
    /// </summary>
    public enum SidebarOptions
    {
        /// <summary>
        /// A sidebar will not be included.
        /// </summary>
        None,
        /// <summary>
        /// A collapsed sidebar will be included.
        /// </summary>
        Collapse,
        /// <summary>
        /// An opened sidebar will be included.
        /// </summary>
        Visible,
        /// <summary>
        /// An opened sidebar will be included only if the document has annotations.
        /// </summary>
        Auto
    }
}
